package com.example.demo.dao;

import com.example.demo.entity.Car;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CarDAO {

    public void insertCar(@Param("goodsid") int goodsid, @Param("num") int num, @Param("userid") int userid);

    public void updateNum(@Param("goodsid") int goodsid, @Param("num") int num, @Param("userid") int userid);

    public void clearCar( @Param("userid") int userid);

    public void removeFromCar(@Param("goodsid") int goodsid, @Param("userid") int userid);

    public Car findbyid(@Param("goodsid") int goodsid, @Param("userid") int userid);

    public List<Car> findUserCar(@Param("userid") int userid);
}
